#include<graphics.h>
#include<conio.h>
#include<stdio.h>
int main()
{
	float pi=3.14159;
	initgraph(800,600);
	setbkcolor(RGB(128,128,128));
	cleardevice();
	int center_x,center_y;
	int radius;
	int i;
	float offset,totaloffset=0;
	while(1)
	{
	for(center_x=100;center_x<800;center_x=center_x+200)
	{
		for(center_y=100;center_y<600;center_y=center_y+200)
		{
			float h=rand()%180;
	COLORREF color1=HSVtoRGB(h,0.9,0.8);
	COLORREF color2=HSVtoRGB(h+180,0.9,0.8);
	for(radius=100;radius>0;radius=radius-20)
	{
		int left=center_x-radius;
		int top=center_y-radius;
		int right=center_x+radius;
		int bottom=center_y+radius;
		for(i=1;i<=20;i++)
		{
			offset=i*pi/10+totaloffset;
			setfillcolor(color1);
			solidpie(left,top,right,bottom,offset,2*pi/60+offset);
			setfillcolor(RGB(255,255,255));
			solidpie(left,top,right,bottom,2*pi/60+offset,3*pi/60+offset);
			setfillcolor(color2);
			solidpie(left,top,right,bottom,3*pi/60+offset,5*pi/60+offset);
			setfillcolor(RGB(0,0,0));
			solidpie(left,top,right,bottom,5*pi/60+offset,6*pi/60+offset);
		}
		totaloffset=totaloffset+pi/20;
	}
		}
	}
	_getch();
	}
	return 0;
}